# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AlertCenter.V1beta1.Model.VoiceMisconfiguration do
  @moduledoc """
  An alert triggered when Google Voice configuration becomes invalid, generally due to an external entity being modified or deleted.

  ## Attributes

  *   `entityName` (*type:* `String.t`, *default:* `nil`) - Name of the entity whose configuration is now invalid.
  *   `entityType` (*type:* `String.t`, *default:* `nil`) - Type of the entity whose configuration is now invalid.
  *   `fixUri` (*type:* `String.t`, *default:* `nil`) - Link that the admin can follow to fix the issue.
  *   `membersMisconfiguration` (*type:* `GoogleApi.AlertCenter.V1beta1.Model.TransferMisconfiguration.t`, *default:* `nil`) - Issue(s) with members of a ring group.
  *   `transferMisconfiguration` (*type:* `GoogleApi.AlertCenter.V1beta1.Model.TransferMisconfiguration.t`, *default:* `nil`) - Issue(s) with transferring or forwarding to an external entity.
  *   `voicemailMisconfiguration` (*type:* `GoogleApi.AlertCenter.V1beta1.Model.VoicemailMisconfiguration.t`, *default:* `nil`) - Issue(s) with sending to voicemail.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :entityName => String.t() | nil,
          :entityType => String.t() | nil,
          :fixUri => String.t() | nil,
          :membersMisconfiguration =>
            GoogleApi.AlertCenter.V1beta1.Model.TransferMisconfiguration.t() | nil,
          :transferMisconfiguration =>
            GoogleApi.AlertCenter.V1beta1.Model.TransferMisconfiguration.t() | nil,
          :voicemailMisconfiguration =>
            GoogleApi.AlertCenter.V1beta1.Model.VoicemailMisconfiguration.t() | nil
        }

  field(:entityName)
  field(:entityType)
  field(:fixUri)

  field(:membersMisconfiguration, as: GoogleApi.AlertCenter.V1beta1.Model.TransferMisconfiguration)

  field(:transferMisconfiguration,
    as: GoogleApi.AlertCenter.V1beta1.Model.TransferMisconfiguration
  )

  field(:voicemailMisconfiguration,
    as: GoogleApi.AlertCenter.V1beta1.Model.VoicemailMisconfiguration
  )
end

defimpl Poison.Decoder, for: GoogleApi.AlertCenter.V1beta1.Model.VoiceMisconfiguration do
  def decode(value, options) do
    GoogleApi.AlertCenter.V1beta1.Model.VoiceMisconfiguration.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AlertCenter.V1beta1.Model.VoiceMisconfiguration do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
